#!/bin/bash

BINDIR='/opt/riscv64-lp64d--glibc--stable-2023.08-1/bin'
BRREAL="$(riscv64-buildroot-linux-gnu-gcc -v |& grep -e br_real)"
if [ -z "${BRREAL}" ] ; then
	if [ ! -d "${BINDIR}" ] ; then
		echo "Error, directory not found: '${BINDIR}'" 1>&2
	else
		export PATH="${PATH}:${BINDIR}"
	fi
fi

unset BINDIR
alias lmake='make ARCH=riscv CROSS_COMPILE=riscv64-buildroot-linux-gnu-'
